package ug.co.icom.kyazze.healthticket.tabswipeadapter;


import ug.co.icom.kyazze.healthticket.AcceptConnectionFragment;
import ug.co.icom.kyazze.healthticket.CurrentMedicationsFragment;
import ug.co.icom.kyazze.healthticket.MainActivity;
import ug.co.icom.kyazze.healthticket.MainItemsFragment;
import ug.co.icom.kyazze.healthticket.ProfileFragment;
import ug.co.icom.kyazze.healthticket.R;
import android.app.Fragment;
import android.app.FragmentManager;

public class TabPagerAdapter extends CustomPagerAdapter {

	public TabPagerAdapter(FragmentManager fragmentManager) {
		super(fragmentManager);

		
		// TODO Auto-generated constructor stub
	}

	public Fragment getItem(int index) {
		
		MainActivity clean = new MainActivity();
		

		switch (index) {
		case 0:
			// Main Items fragment activity
			//clean.cleanup();

			return new MainItemsFragment();
		case 1:
			// Dr. Consultations fragment activity
			return new AcceptConnectionFragment();//DrConsultationsFragment();
		case 2:
			// Current Medications fragment activity
			return new ProfileFragment();//CurrentMedicationsFragment();
		}

		return null;
	}

	@Override
	public int getCount() {
		// get item count - equal to number of tabs
		return 3;
	}

//
//	@Override
//	public boolean isViewFromObject(View arg0, Object arg1) {
//		// TODO Auto-generated method stub
//		return false;
//	}

}
